CC = gcc
CFLAGS += -I . -Wall

all: kingbob client

kingbob: kingbob.o tcp.o tunnel.o
	$(CC) -o $@ $^ $(CFLAGS)

client: client.o tcp.o tunnel.o
	$(CC) -o $@ $^ $(CFLAGS)

#fileinfo: fileinfo.o sha1.o
#$(CC) -o $@ $^ $(CFLAGS)

client.o: client.c
	$(CC) -o $@ -c $^ $(CFLAGS)

kingbob.o: kingbob.c
	$(CC) -o $@ -c $^ $(CFLAGS)

tcp.o: tcp.c
	$(CC) -o $@ -c $^ $(CFLAGS)

tunnel.o: tunnel.c
	$(CC) -o $@ -c $^ $(CFLAGS)

clean:
	rm  -rf *.o kingbob client
